package com.example.javabasic.thread.classone.demo2;

public class RunnableTest implements Runnable {
    private int n = 1;
    @Override
    public void run() {
        while(n<30){
            System.out.println(Thread.currentThread().getName()+":"+n++);
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
